﻿using System;

namespace UnitDriven
{
	[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
	public class TestCaseAttribute : Attribute
	{
		public TestCaseAttribute(object arg)
		{
			this.Arguments = new[] { arg };
		}

		public TestCaseAttribute(params object[] arguments)
		{
			this.Arguments = arguments;
		}

		public TestCaseAttribute(object arg1, object arg2)
		{
			this.Arguments = new[] { arg1, arg2 };
		}

		public TestCaseAttribute(object arg1, object arg2, object arg3)
		{
			this.Arguments = new[] { arg1, arg2, arg3 };
		}

		public object[] Arguments { get; private set; }

		public string Description { get; set; }

		public Type ExpectedException { get; set; }

		public string ExpectedExceptionName { get; set; }

		public string ExpectedMessage { get; set; }

		public MessageMatch MatchType { get; set; }

		public object Result { get; set; }

		public string TestName { get; set; }
	}

	public enum MessageMatch
	{
		Exact = 0,
		Contains = 1,
		Regex = 2,
		StartsWith = 3,
	}
}
